//
//  KKImagePickerManager+Tools.m
//  KKImagePickerController
//
//  Created by liaozhenming on 16/3/11.
//  Copyright © 2016年 JuniorCodingPerson. All rights reserved.
//

#import "KKImagePickerManager+Tools.h"

@implementation KKImagePickerManager (Tools)

+ (void)kk_showErrorMessage:(NSString *)message {
    
    dispatch_async(dispatch_get_main_queue(), ^{
        
        if (message == nil) {
            return;
        }
        
        UIAlertController *alertController = [UIAlertController alertControllerWithTitle: @"提示" message: message preferredStyle: UIAlertControllerStyleAlert];
        UIAlertAction *cancelAction = [UIAlertAction actionWithTitle: @"关闭" style:UIAlertActionStyleCancel handler: nil];
        [alertController addAction: cancelAction];
        
        UIViewController *rootViewController = [[[UIApplication sharedApplication] keyWindow] rootViewController];
        [rootViewController presentViewController: alertController animated: true completion: nil];
    });
}

@end
